package cn.opencodes.framework.core.utils;

  
/** 
 * app生成key
 * @author hj 
 */  
public class AppUtils {  
    
    /**
     * AppKey生成
     */
    public static String genAppKey(String uname){
    	return SecurityUtils.getMD5Hash(uname);
    }

	/**
	 * Screct生成(shiro-SHA-256加密)
	 */
	public static String genAppSecret(String appkey, String salt) {
		return SecurityUtils.getSHA256(appkey, salt, 2);
	}
	
	
	/*public static void main(String[] args) {
		String appkey = genAppKey("kingdee");
		System.out.println(appkey);
		String salt = "WjjnKNDIPSQLJy4WfMVZ";//randomBuildString(20);
		String secret = genAppSecret(appkey, salt);
		System.out.println(secret);
	}*/
}  